Skip to content

fix(Popover): the touch growth shows its content from its first frame - #10757

Merged
cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/popover-growth-first-frame
Nov 9, 2026
Merged

cixzhang merged 1 commit into
meta:mainfrom
vjeux:uikit/popover-growth-first-frame

Conversation

@vjeux

@vjeux vjeux commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

User impact

In Chromium on a touch screen, a Popover opened by a finger shows one to three frames without its content, on almost every opening. With this change the growth shows its content from its first frame, and no pixel differs.

Problem and solution fit

The growth's opacity started at exactly 0. Chromium skips drawing a layer at exactly 0 as its animation starts, and rasterizes it once the fade makes it visible. So the first visible frame is late and can lack the content. A UIKit popover shows its content from its first frame. The growth now fades in from 0.001, a quarter of one 8-bit step: Chromium draws the first frame, and no pixel changes.

Expected behavior and authority

component:Popover FR9 (spec:AST-094 FR31) defines the growth, and no current record says it starts at alpha 0. New component:Popover PR5 states the expected behavior.

Smallest restoration

  • motion/opacityFloor.ts (new, internal): ENTRANCE_OPACITY_FLOOR = 0.001, with its reason. The motion README lists it.
  • popoverSurfaceMotion.ts: the growth's opacity curve does not go below the floor. The start values keep opacity 0, so under Reduce Motion the cross-fade still fades in from transparent. The exit is unchanged.

This touches the same import lines of popoverSurfaceMotion.ts as #9769. Whichever lands second resolves the conflict; this pull request rebases if theirs lands first.

Evidence

Full numbers and method: evidence.

  • Before the change: the new proof fails on main in 20 of 20 runs and names the frames presented without content. It reads Chromium's record of each presented frame (PipelineReporter).
  • After the change: the proof passes in 20 of 20 runs. Over 40 interleaved openings, main presents missing content in 40 of 40, with and without a tap outside; with the change, 0 of 40.
  • Under heavy load: the proof passes in 40 of 40 runs with the change, and main fails in 32 of 40. The runs share 4 CPUs with busy loops, at a host load of 51 to 113.
  • Unchanged paths: the Reduce Motion cross-fade proof and its unit test pass, as does every other PopoverTouchMotion proof. The curve proof's opacity tolerance is 20 times the floor. 22 other opacity-0 entrances in core, measured the same way, need no floor.
  • Regression test: "the growth shows its content from its first frames", with and without a tap outside.

Scope

  • One defect is restored.
  • Separable contradictory or unsettled tagalongs were removed or split.
  • No new public API, visual representation, default, or interaction model is hidden under the bug-fix label.
  • Public text and artifacts contain no internal Meta context.

Testing

pnpm build && pnpm storybook:build
pnpm exec playwright test --config playwright.interaction.config.ts --project=chromium packages/core/src/Popover/__tests__/PopoverTouchMotion.interaction.browser.spec.ts
pnpm exec playwright test --config playwright.interaction.config.ts --project=chromium packages/core/src/Popover/__tests__/PopoverTouchMotion.interaction.browser.spec.ts -g "the growth shows its content from its first frames" --repeat-each=10
pnpm exec vitest run --project ui packages/core/src/Popover packages/core/src/motion
pnpm check:knowledge

Writing rubric results

  • R1 narration: none; PR5 is present tense.
  • R2 research: none in the record; the numbers are in the evidence.
  • R3 evidence: the PR5 row names the proof, not a change.
  • R4 rejected alternatives: none.
  • R5 change references: none added.
  • R6 open questions: none added.

@vercel

vercel Bot commented Nov 9, 2026 •

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated
astryx Ready Ready Preview Nov 9, 2026 6:16am UTC

Request Review

@meta-cla meta-cla Bot added the CLA Signed This label is managed by the Meta Open Source bot. label Nov 9, 2026
@astracat-bot

astracat-bot Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

AI review status for this pull request.

Review status Updated
🟢 Reviewed (for maintainers only) Nov 9, 2026, 6:32 AM UTC

@github-actions github-actions Bot added the needs:design-review Affects visuals — Design should review label Nov 9, 2026
@github-actions github-actions Bot added the needs:spec-owner-review Current knowledge records await owner approval label Nov 9, 2026
@github-actions

github-actions Bot commented Nov 9, 2026 •

Copy link
Copy Markdown
Contributor

PR Analysis Report

🔎 Preview · 6eaac92

Storybook · Sandbox · built from this PR's head

Modified components

Component Size LoC Visual · A11y · RTL
lab/CommentComposer 151.6 kB (+23 B) · 1.9 kB CSS (0) — — · — · —
lab/ChatReactionBar 107.1 kB (+20 B) · 1.1 kB CSS (0) — — · — · —
lab/ChatEmojiPicker 106.0 kB (+19 B) · 773 B CSS (0) — — · — · —
4 more components
Component Size LoC Visual · A11y · RTL
Popover · Storybook 91.1 kB (+18 B) · 14.2 kB CSS (0) 1,540 (+9) ✓ · ✓ · ✓
lab/Comments 350.8 kB (+17 B) · 2.5 kB CSS (0) — — · — · —
lab/TourStep 97.4 kB (+13 B) · 590 B CSS (0) — — · — · —
lab/CommentThread 343.9 kB (+11 B) · 2.4 kB CSS (0) — — · — · —

Package size: @astryxdesign/core 7.20 MB packed (+824 B); no new dependencies.

API changes: none in this pull request

Committed API report behind this build: cli 29 rows, core 34 rows, theme-butter 1 row, theme-y2k 1 row; run pnpm api:report.

Touched components checked; add ci:run-visual, ci:run-a11y or ci:run-rtl to run the full suites.


Generated by PR Enrichment workflow | View full report

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The fix is small and well proven: the new first-frames proof fails on main and passes here, and the Reduce Motion, exit and mouse paths are unchanged.

Approval waits on one spec decision, because the pull request adds a requirement to a current record:

  • component:Popover PR5 and its verification row need an engineering owner to approve them by commenting /approve-spec <full head SHA> (the author is an engineering owner and may do so), or to ask for different wording, such as stating only the outcome and leaving 0.001 to code.

No code change is required, and the inline notes are optional comment tidy-ups; CI has not run yet because this is a draft from a fork, so it needs to leave draft and get a maintainer's ci:run label.

[Automated review]

Chromium skips drawing a layer at exactly opacity 0 as its animation
starts. Under a finger, Popover's growth faded in from 0, so Chromium
rasterized the popover again once the fade made it visible, and the
first frames showed it without its content.

The growth now fades in from opacity 0.001, a quarter of one step of an
8-bit channel: Chromium draws its first frame, and no pixel changes. The
floor is defined once, in motion/opacityFloor.ts, for compositor
entrances that fade in from transparent. The start values keep opacity
0, so Reduce Motion, which replaces the growth with a cross-fade, still
fades in from transparent.

A new proof reads the compositor's record of each frame it presents: the
growth shows its content from its first frames, also with a tap outside
while it grows. component:Popover records the floor as PR5.
@vjeux
vjeux force-pushed the uikit/popover-growth-first-frame branch from dc660a6 to 6eaac92 Compare November 9, 2026 06:08
@cixzhang cixzhang added the ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) label Nov 9, 2026
@cixzhang

cixzhang commented Nov 9, 2026

Copy link
Copy Markdown
Contributor

/approve-spec 6eaac92

@github-actions github-actions Bot removed the needs:spec-owner-review Current knowledge records await owner approval label Nov 9, 2026

@astracat-bot astracat-bot Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Approved pending CI. The touch growth's opacity floor is small and well proven, and the new component:Popover PR5 is approved for this head.

  • The new first-frames proof fails on main and passes here; the Reduce Motion, shrink and mouse paths are unchanged.
  • CI has not run on this head yet, because the pull request is still a draft and a draft runs no CI. It already carries ci:run, so marking it ready for review starts CI.

The earlier comment suggestions are all applied.

[Automated review]

@vjeux
vjeux marked this pull request as ready for review November 9, 2026 06:37
@cixzhang
cixzhang merged commit b6509b1 into meta:main Nov 9, 2026
128 checks passed
@vjeux
vjeux deleted the uikit/popover-growth-first-frame branch November 9, 2026 07:14

This branch was successfully deployed

1 active deployment
Preview — 6eaac928 Deployed Nov 9, 2026 by vercel[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:run A maintainer lets this outside contributor's pull request run CI (AST-030 FR17) CLA Signed This label is managed by the Meta Open Source bot. needs:design-review Affects visuals — Design should review

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants